Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(Re-)Run checkout script if workspace was modified #549

Merged
merged 2 commits into from
Jan 10, 2024

Conversation

jkloetzke
Copy link
Member

No description provided.

If there is a checkoutScript or some checkoutAssert's and the checkout
workspace was changed since the last time, we must re-run the step.

This fixes a problem on Jenkins builds where the checkoutScript modifies
a git repository. This change will be squashed by the Jenkins git plugin
every time the job runs. Now if the script was marked deterministic, Bob
still has to run it again to re-apply any modifications.

Another example are code generators that should probably be run again if
the workspace has changed. In fact, if the script was enabled for
checkout-only updates (checkoutUpdateIf), then such modifications would
already trigger the re-run if the workspace was modified.
Sometimes its hard to know why a checkout step was executed because
there are a couple of possible reasons. Let the user know why exactly
the checkout as triggered instead of guessing.
Copy link

codecov bot commented Jan 9, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (077a9f9) 88.73% compared to head (f04e34f) 88.73%.

Files Patch % Lines
pym/bob/builder.py 92.85% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #549      +/-   ##
==========================================
- Coverage   88.73%   88.73%   -0.01%     
==========================================
  Files          46       46              
  Lines       14697    14722      +25     
==========================================
+ Hits        13041    13063      +22     
- Misses       1656     1659       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jkloetzke jkloetzke merged commit 96fb8e0 into BobBuildTool:master Jan 10, 2024
10 of 11 checks passed
@jkloetzke jkloetzke deleted the checkout-script-rerun branch January 10, 2024 08:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant